from django.shortcuts import render
from django.http import HttpResponse,JsonResponse
import os,json

    
def text(request):
    post_data = request.body
    data = json.loads(post_data)
    text = data['text']
    return HttpResponse(text)

def return_text():
    result = []
    f = open('attack_method.txt','r',encoding = 'utf-8')
    attack_method = f.read()
    attack_method = attack_method.split('\n')
    f.close()
    print(attack_method)
    # return render(request,'visitor.html',{"attack_method": attack_method})